import request from '@/utils/request';


export function allAdminApi() {
	return {
		// 校区
		campusinfoApi: (params) => {
			return request({
				url: '/api/campusinfo',
				method: 'post',
				data: params,
			});
		},
		campusList: (params) => {
			return request({
				url: '/api/campusinfo',
				method: 'get',
				params
			});
		},
		deletecampusinfo: (id) => {
			return request({
				url: `/api/campusinfo/${id}`,
				method: 'delete',
			});
		},
		listNotPage: (params) => {
			return request({
				url: '/api/campusinfo/listNotPage',
				method: 'get',
				params
			});
		},
		// 学员
		studentinfoApi: (params) => {
			return request({
				url: '/api/studentinfo',
				method: 'post',
				data: params,
			});
		},
		studentinfoList: (params) => {
			return request({
				url: '/api/studentinfo',
				method: 'get',
				params
			});
		},
		deletestudentinfo: (id) => {
			return request({
				url: `/api/studentinfo/${id}`,
				method: 'delete',
			});
		},
		// 教练  
		addOrUpdateUserApi: (params) => {
			return request({
				url: '/api/users/addOrUpdateUser',
				method: 'post',
				data: params,
			});
		},
		userslistApi: (params) => {
			return request({
				url: '/api/users/list',
				method: 'post',
				data: params,
			});
		},
		deleteusersinfo: (id) => {
			return request({
				url: `/api/users/${id}`,
				method: 'delete',
			});
		},
		listNotPageList: (params) => {
			return request({
				url: '/api/studentinfo/listNotPage',
				method: 'get',
				params
			});
		},
		bindStudentApi: (params) => {
			return request({
				url: '/api/users/bindStudent',
				method: 'post',
				data: params,
			});
		},
		//课程  
		addcourseinfoApi: (params) => {
			return request({
				url: '/api/courseinfo',
				method: 'post',
				data: params,
			});
		},
		courseinfoList: (params) => {
			return request({
				url: '/api/courseinfo',
				method: 'get',
				params
			});
		},
		deletecourseinfo: (id) => {
			return request({
				url: `/api/courseinfo/${id}`,
				method: 'delete',
			});
		},
		//班级 
		addclassinfoApi: (params) => {
			return request({
				url: '/api/classinfo',
				method: 'post',
				data: params,
			});
		},
		classinfoList: (params) => {
			return request({
				url: '/api/classinfo',
				method: 'get',
				params
			});
		},
		deleteclassinfoinfo: (id) => {
			return request({
				url: `/api/classinfo/${id}`,
				method: 'delete',
			});
		},
		courseinfofoList: (params) => {
			return request({
				url: '/api/courseinfo/listNotPage',
				method: 'get',
				params
			});
		},
		addstudentclassApi: (params) => {
			return request({
				url: '/api/studentclass',
				method: 'post',
				data: params,
			});
		},
		studentworkList: (params) => {
			return request({
				url: '/api/studentwork',
				method: 'get',
				params
			});
		},
		studentcourseList: (params) => {
			return request({
				url: '/api/studentcourse',
				method: 'get',
				params
			});
		},




		//排课 
		addworkoutApi: (params) => {
			return request({
				url: '/api/workout',
				method: 'post',
				data: params,
			});
		},
		workoutList: (params) => {
			return request({
				url: '/api/workout',
				method: 'get',
				params
			});
		},
		worklistPc: (params) => {
			return request({
				url: '/api//workout/listPc',
				method: 'get',
				params
			});
		},
		deleteworkoutinfo: (id) => {
			return request({
				url: `/api/workout/${id}`,
				method: 'delete',
			});
		},
		updateworkoutApi: (params) => {
			return request({
				url: '/api/workout/update',
				method: 'post',
				data: params,
			});
		},
		listNoPagetList: (params) => {
			return request({
				url: '/api/studentclass/listNoPage',
				method: 'get',
				params
			});
		},
		
		// 购买课程  
		addstudentcourseApi: (params) => {
			return request({
				url: '/api/studentcourse',
				method: 'post',
				data: params,
			});
		},
		// studentcourseList: (params) => {
		// 	return request({
		// 		url: '/api/studentcourse',
		// 		method: 'get',
		// 		params
		// 	});
		// }, 
		deletestudentcourse: (id) => {
			return request({
				url: `/api/studentcourse/${id}`,
				method: 'delete',
			});
		},

		dolondsApi: (params) => {
			return request({
				url: '/api/studentcourse/downloadPdf',
				method: 'post',
				responseType: 'blob',
				data: params,
			});
		},
		exportExcelApi: (params) => {
			return request({
				url: '/api/studentinfo/export',
				method: 'get',
				responseType: 'blob',
				params,
			});
		},
		generateQrCodeApi: (studentId) => {
			return request({
				url: `/api/studentinfo/generateQrCode/${studentId}`,
				method: 'get',
			});
		},
		getContractApi: (id) => {
			return request({
				url: `/api/studentcourse/getContract/${id}`,
				method: 'get',
			});
		},
		// 退班
		outclassinfoinfo: (id) => {
			return request({
				url: `/api/studentclass/${id}`,
				method: 'delete',
			});
		},
		// 退费
		outmoneApi: (id) => {
			return request({
				url: `/api/studentcourse/refundCourse/${id}`,
				method: 'get',
			});
		},
		// 协议列表
		agreementApi: (params) => {
			return request({
				url: '/api/protocolinfo',
				method: 'get',
				// responseType: 'blob',
				params,
			});
		},
		// 上传协议 
		addProtocolinfoApi: (params) => {
			return request({
				url: '/api/protocolinfo',
				method: 'post',
				data: params,
			});
		},
		// 删除协议
		deletProtocolinfo: (id) => {
			return request({
				url: `/api//protocolinfo/${id}`,
				method: 'delete',
			});
		},
		// 签署列表
		agreelistPcApi: (params) => {
			return request({
				url: '/api/parentprotoccol/listPc',
				method: 'get',
				// responseType: 'blob',
				params,
			});
		},
		// 退回
		outresignApi: (id) => {
			return request({
				url: `/api/parentprotoccol/resign/${id}`,
				method: 'get',
			});
		},
	};
}
